package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PressureSensorMapper;
import com.ruoyi.system.domain.PressureSensor;
import com.ruoyi.system.service.IPressureSensorService;

/**
 * 压力传感器数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-28
 */
@Service
public class PressureSensorServiceImpl implements IPressureSensorService 
{
    @Autowired
    private PressureSensorMapper pressureSensorMapper;

    /**
     * 查询压力传感器数据
     * 
     * @param id 压力传感器数据主键
     * @return 压力传感器数据
     */
    @Override
    public PressureSensor selectPressureSensorById(Long id)
    {
        return pressureSensorMapper.selectPressureSensorById(id);
    }

    /**
     * 查询压力传感器数据列表
     * 
     * @param pressureSensor 压力传感器数据
     * @return 压力传感器数据
     */
    @Override
    public List<PressureSensor> selectPressureSensorList(PressureSensor pressureSensor)
    {
        return pressureSensorMapper.selectPressureSensorList(pressureSensor);
    }

    /**
     * 新增压力传感器数据
     * 
     * @param pressureSensor 压力传感器数据
     * @return 结果
     */
    @Override
    public int insertPressureSensor(PressureSensor pressureSensor)
    {
        pressureSensor.setCreateTime(DateUtils.getNowDate());
        return pressureSensorMapper.insertPressureSensor(pressureSensor);
    }

    /**
     * 修改压力传感器数据
     * 
     * @param pressureSensor 压力传感器数据
     * @return 结果
     */
    @Override
    public int updatePressureSensor(PressureSensor pressureSensor)
    {
        return pressureSensorMapper.updatePressureSensor(pressureSensor);
    }

    /**
     * 批量删除压力传感器数据
     * 
     * @param ids 需要删除的压力传感器数据主键
     * @return 结果
     */
    @Override
    public int deletePressureSensorByIds(Long[] ids)
    {
        return pressureSensorMapper.deletePressureSensorByIds(ids);
    }

    /**
     * 删除压力传感器数据信息
     * 
     * @param id 压力传感器数据主键
     * @return 结果
     */
    @Override
    public int deletePressureSensorById(Long id)
    {
        return pressureSensorMapper.deletePressureSensorById(id);
    }
}
